const express = require('express');
const ejs = require('ejs');

let app = express();

app.set('views',__dirname+'/views');
app.engine('html',ejs.renderFile);

let {heros} = require('./data/lol.json');


app.use(express.static(__dirname+'/public'));

app.get('/',(req,res)=>{
    // res.render('index.html',{heros});

    let str = `<div class="hero-list">
        <div class="item">
            <img src="" alt="">
            <p></p>
        </div>
    </div>`;

    res.send(str)
})

app.listen(80,()=>{
    console.log('启动成功');
})